Q: What is GetPortBitMapForCopyBits and is it only for
use with CopyBits ?
A: GetPortBitMapForCopyBits is designed to do the right thing when extracting
a BitMap/PixMap out of a GrafPort/CGrafPort/GWorld . If you are given a
port and need to pull out the BitMap/PixMap to pass to a QuickDraw function
that takes a pointer to a BitMap , then you should use GetPortBitMapForCopyBits .
While the name GetPortBitMapForCopyBits suggests that the function can
only be used with CopyBits , there are a number of other APIs in QuickDraw
that have BitMap pointers for parameters but can take
PixMap pointers as well.
CopyMask and CopyDeepMask are two examples.
|